<template>
</template>

<script setup>
import {ref, reactive, onMounted} from "vue";
import router from "@/router/index.js";
import { useRoute } from 'vue-router';
import axios from '@/plugins/axios.js'
const route = useRoute();
const token = ref(route.query.token);

function checkToken(){

  axios.get("login/check/email",{"token":token.value}).then(result=>{
    if (result.code === 200){
      //已经 正确了
      router.push("/password/update?token="+result.data)
    }else {
      router.push("/password/error")
    }
  })
}

onMounted(() => {
  checkToken();
});
</script>

<style scoped>

</style>